package com.yuandian.api.management.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yuandian.api.management.validate.DeleteFlag;
import com.yuandian.api.management.validate.InsertFlag;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.groups.Default;
import java.time.LocalDateTime;

/**
 * 网络拓扑配置表
 * @author zfsn
 * @date 2023-3-16
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "网络拓扑配置表", description = "网络拓扑配置表")
@TableName("conf_component_info_config")
public class ConfNetTopology extends Model<ConfNetTopology> {

	/** 主键，唯一标识数据 */
	@Null(message = "主键id一定为null", groups = InsertFlag.class)
	@NotNull(message = "组件id不能为空", groups = DeleteFlag.class)
	@ApiModelProperty(value = "主键", notes = "主键，唯一标识数据")
	@TableId(type = IdType.AUTO)
	private Integer id;


	/** 所属系统id */
	@NotNull(message = "系统id不能为空", groups = {InsertFlag.class, Default.class})
	@ApiModelProperty(value = "所属系统id", notes = "所属系统id")
	private Integer systemId;


	/** 组件名称 */
	@NotNull(message = "组件名称不能为空", groups = {InsertFlag.class})
	@ApiModelProperty(value = "组件名称", notes = "组件名称")
	private String componentName;


	/** 连接类型 */
	@NotNull(message = "连接类型不能为空", groups = InsertFlag.class)
	@ApiModelProperty(value = "连接类型", notes = "连接类型")
	private String connectType;


	/** 基础设施（设备类型） */
	@NotNull(message = "基础设施（设备类型）不能为空", groups = InsertFlag.class)
	@ApiModelProperty(value = "基础设施（设备类型）", notes = "基础设施（设备类型）")
	private String deviceType;


	/** 所在位置(网络类型） */
	@NotNull(message = "所在位置(网络类型）不能为空", groups = InsertFlag.class)
	@ApiModelProperty(value = "所在位置(网络类型）", notes = "所在位置(网络类型）")
	private String netType;


	/** 网络性能分析页面X坐标 */
	@JsonIgnore
	@ApiModelProperty(value = "网络性能分析页面X坐标", notes = "网络性能分析页面X坐标")
	private String netLocationX;


	/** 网络性能分析页面Y坐标 */
	@JsonIgnore
	@ApiModelProperty(value = "网络性能分析页面Y坐标", notes = "网络性能分析页面Y坐标")
	private String netLocationY;


	/** 创建人 */
	@JsonIgnore
	@ApiModelProperty(value = "创建人", notes = "创建人")
	private String createBy;


	/** 创建时间 */
	@JsonIgnore
	@ApiModelProperty(value = "创建时间", notes = "创建时间")
	private String createTime;


	/** 更新人 */
	@JsonIgnore
	@ApiModelProperty(value = "更新人", notes = "更新人")
	private String updateBy;


	/** 更新时间 */
	@JsonIgnore
	@ApiModelProperty(value = "更新时间", notes = "更新时间")
	private LocalDateTime updateTime;

	/**
	 * 是否递归删除
	 */
	@TableField(exist = false)
	@ApiModelProperty(value = "是否递归删除，默认false", notes = "是否递归删除，默认false")
	private Boolean isRecursiveDelete;

}
